package com.recycle.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.recycle.common.annotation.Excel;
import com.recycle.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 订单信息对象 order
 *
 * @author recycle
 * @date 2023-03-11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("sys_order")
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单id */
    @Excel(name = "订单编号")
    @TableId
    private Long orderId;

    /** 订单类型(0=供应方,1=需求方) */
    @Excel(name = "订单类型", readConverterExp = "0=供应方,1=需求方")
    private Long orderType;

    /** 发布者id */
    @Excel(name = "发布者id")
    private Long publisherId;

    /** 完成者id */
    @Excel(name = "完成者id")
    private Long finisherId;

    /** 订单描述 */
    @Excel(name = "订单描述")
    private String description;

    /** 订单状态(0=进行中,1=已完成,2=已锁定,3=已失效) */
    @Excel(name = "订单状态", readConverterExp = "0=进行中,1=已完成,2=已结束,3=已失效")
    private Long status;

    @TableField(exist = false)
    private List<OrderItem> itemList;


}
